import {
  getBuildConfig,
  cjsCompatPlugin,
  lcSecretsPlugin,
  importMapPlugin,
  importConstantsPlugin,
} from "@langchain/build";

export default getBuildConfig({
  entry: [
    "./src/index.ts",
    "./src/load/index.ts",
    "./src/load/serializable.ts",
    "./src/tools/aiplugin.ts",
    "./src/tools/aws_lambda.ts",
    "./src/tools/aws_sfn.ts",
    "./src/tools/bingserpapi.ts",
    "./src/tools/brave_search.ts",
    "./src/tools/duckduckgo_search.ts",
    "./src/tools/calculator.ts",
    "./src/tools/connery.ts",
    "./src/tools/dadjokeapi.ts",
    "./src/tools/discord.ts",
    "./src/tools/dynamic.ts",
    "./src/tools/dataforseo_api_search.ts",
    "./src/tools/gmail/index.ts",
    "./src/tools/google_calendar/index.ts",
    "./src/tools/google_custom_search.ts",
    "./src/tools/google_places.ts",
    "./src/tools/google_trends.ts",
    "./src/tools/google_routes.ts",
    "./src/tools/google_scholar.ts",
    "./src/tools/ifttt.ts",
    "./src/tools/searchapi.ts",
    "./src/tools/searxng_search.ts",
    "./src/tools/serpapi.ts",
    "./src/tools/serper.ts",
    "./src/tools/stackexchange.ts",
    "./src/tools/wikipedia_query_run.ts",
    "./src/tools/wolframalpha.ts",
    "./src/agents/toolkits/aws_sfn.ts",
    "./src/agents/toolkits/base.ts",
    "./src/agents/toolkits/connery/index.ts",
    "./src/agents/toolkits/ibm.ts",
    "./src/agents/toolkits/stagehand.ts",
    "./src/embeddings/alibaba_tongyi.ts",
    "./src/embeddings/bytedance_doubao.ts",
    "./src/embeddings/deepinfra.ts",
    "./src/embeddings/fireworks.ts",
    "./src/embeddings/gradient_ai.ts",
    "./src/embeddings/hf.ts",
    "./src/embeddings/huggingface_transformers.ts",
    "./src/embeddings/ibm.ts",
    "./src/embeddings/jina.ts",
    "./src/embeddings/llama_cpp.ts",
    "./src/embeddings/minimax.ts",
    "./src/embeddings/premai.ts",
    "./src/embeddings/tensorflow.ts",
    "./src/embeddings/tencent_hunyuan/index.ts",
    "./src/embeddings/tencent_hunyuan/web.ts",
    "./src/embeddings/togetherai.ts",
    "./src/embeddings/voyage.ts",
    "./src/embeddings/zhipuai.ts",
    "./src/llms/ai21.ts",
    "./src/llms/aleph_alpha.ts",
    "./src/llms/arcjet.ts",
    "./src/llms/bedrock/index.ts",
    "./src/llms/bedrock/web.ts",
    "./src/llms/deepinfra.ts",
    "./src/llms/fireworks.ts",
    "./src/llms/friendli.ts",
    "./src/llms/gradient_ai.ts",
    "./src/llms/hf.ts",
    "./src/llms/ibm.ts",
    "./src/llms/llama_cpp.ts",
    "./src/llms/portkey.ts",
    "./src/llms/raycast.ts",
    "./src/llms/replicate.ts",
    "./src/llms/sagemaker_endpoint.ts",
    "./src/llms/togetherai.ts",
    "./src/llms/writer.ts",
    "./src/llms/layerup_security.ts",
    "./src/vectorstores/analyticdb.ts",
    "./src/vectorstores/astradb.ts",
    "./src/vectorstores/azion_edgesql.ts",
    "./src/vectorstores/azure_aisearch.ts",
    "./src/vectorstores/cassandra.ts",
    "./src/vectorstores/chroma.ts",
    "./src/vectorstores/clickhouse.ts",
    "./src/vectorstores/closevector/node.ts",
    "./src/vectorstores/closevector/web.ts",
    "./src/vectorstores/convex.ts",
    "./src/vectorstores/couchbase_search.ts",
    "./src/vectorstores/elasticsearch.ts",
    "./src/vectorstores/faiss.ts",
    "./src/vectorstores/googlevertexai.ts",
    "./src/vectorstores/hnswlib.ts",
    "./src/vectorstores/hanavector.ts",
    "./src/vectorstores/lancedb.ts",
    "./src/vectorstores/libsql.ts",
    "./src/vectorstores/mariadb.ts",
    "./src/vectorstores/milvus.ts",
    "./src/vectorstores/momento_vector_index.ts",
    "./src/vectorstores/myscale.ts",
    "./src/vectorstores/neo4j_vector.ts",
    "./src/vectorstores/neon.ts",
    "./src/vectorstores/opensearch.ts",
    "./src/vectorstores/pgvector.ts",
    "./src/vectorstores/prisma.ts",
    "./src/vectorstores/rockset.ts",
    "./src/vectorstores/singlestore.ts",
    "./src/vectorstores/supabase.ts",
    "./src/vectorstores/tigris.ts",
    "./src/vectorstores/turbopuffer.ts",
    "./src/vectorstores/typeorm.ts",
    "./src/vectorstores/typesense.ts",
    "./src/vectorstores/upstash.ts",
    "./src/vectorstores/usearch.ts",
    "./src/vectorstores/vectara.ts",
    "./src/vectorstores/vercel_postgres.ts",
    "./src/vectorstores/voy.ts",
    "./src/vectorstores/xata.ts",
    "./src/vectorstores/zep.ts",
    "./src/vectorstores/zep_cloud.ts",
    "./src/chat_models/alibaba_tongyi.ts",
    "./src/chat_models/arcjet.ts",
    "./src/chat_models/bedrock/index.ts",
    "./src/chat_models/bedrock/web.ts",
    "./src/chat_models/deepinfra.ts",
    "./src/chat_models/fireworks.ts",
    "./src/chat_models/friendli.ts",
    "./src/chat_models/ibm.ts",
    "./src/chat_models/iflytek_xinghuo/index.ts",
    "./src/chat_models/iflytek_xinghuo/web.ts",
    "./src/chat_models/llama_cpp.ts",
    "./src/chat_models/minimax.ts",
    "./src/chat_models/moonshot.ts",
    "./src/chat_models/novita.ts",
    "./src/chat_models/perplexity.ts",
    "./src/chat_models/portkey.ts",
    "./src/chat_models/premai.ts",
    "./src/chat_models/tencent_hunyuan/index.ts",
    "./src/chat_models/tencent_hunyuan/web.ts",
    "./src/chat_models/togetherai.ts",
    "./src/chat_models/webllm.ts",
    "./src/chat_models/zhipuai.ts",
    "./src/callbacks/handlers/lunary.ts",
    "./src/callbacks/handlers/upstash_ratelimit.ts",
    "./src/retrievers/arxiv.ts",
    "./src/retrievers/azion_edgesql.ts",
    "./src/retrievers/bm25.ts",
    "./src/retrievers/chaindesk.ts",
    "./src/retrievers/metal.ts",
    "./src/retrievers/remote/index.ts",
    "./src/retrievers/supabase.ts",
    "./src/retrievers/tavily_search_api.ts",
    "./src/retrievers/vectara_summary.ts",
    "./src/retrievers/vespa.ts",
    "./src/retrievers/zep.ts",
    "./src/structured_query/chroma.ts",
    "./src/structured_query/supabase.ts",
    "./src/structured_query/vectara.ts",
    "./src/retrievers/zep_cloud.ts",
    "./src/caches/ioredis.ts",
    "./src/caches/momento.ts",
    "./src/caches/upstash_redis.ts",
    "./src/caches/vercel_kv.ts",
    "./src/graphs/document.ts",
    "./src/graphs/memgraph_graph.ts",
    "./src/graphs/neo4j_graph.ts",
    "./src/document_compressors/ibm.ts",
    "./src/document_transformers/html_to_text.ts",
    "./src/document_transformers/mozilla_readability.ts",
    "./src/storage/cassandra.ts",
    "./src/storage/convex.ts",
    "./src/storage/ioredis.ts",
    "./src/storage/upstash_redis.ts",
    "./src/storage/vercel_kv.ts",
    "./src/stores/doc/base.ts",
    "./src/stores/doc/gcs.ts",
    "./src/stores/doc/in_memory.ts",
    "./src/stores/message/astradb.ts",
    "./src/stores/message/cassandra.ts",
    "./src/stores/message/convex.ts",
    "./src/stores/message/dynamodb.ts",
    "./src/stores/message/firestore.ts",
    "./src/stores/message/file_system.ts",
    "./src/stores/message/in_memory.ts",
    "./src/stores/message/ipfs_datastore.ts",
    "./src/stores/message/ioredis.ts",
    "./src/stores/message/momento.ts",
    "./src/stores/message/neo4j.ts",
    "./src/stores/message/planetscale.ts",
    "./src/stores/message/postgres.ts",
    "./src/stores/message/aurora_dsql.ts",
    "./src/stores/message/upstash_redis.ts",
    "./src/stores/message/xata.ts",
    "./src/stores/message/zep_cloud.ts",
    "./src/memory/chat_memory.ts",
    "./src/memory/mem0.ts",
    "./src/memory/motorhead_memory.ts",
    "./src/memory/zep.ts",
    "./src/memory/zep_cloud.ts",
    "./src/indexes/base.ts",
    "./src/indexes/postgres.ts",
    "./src/indexes/memory.ts",
    "./src/indexes/sqlite.ts",
    "./src/document_loaders/web/airtable.ts",
    "./src/document_loaders/web/apify_dataset.ts",
    "./src/document_loaders/web/assemblyai.ts",
    "./src/document_loaders/web/azure_blob_storage_container.ts",
    "./src/document_loaders/web/azure_blob_storage_file.ts",
    "./src/document_loaders/web/browserbase.ts",
    "./src/document_loaders/web/cheerio.ts",
    "./src/document_loaders/web/html.ts",
    "./src/document_loaders/web/puppeteer.ts",
    "./src/document_loaders/web/playwright.ts",
    "./src/document_loaders/web/college_confidential.ts",
    "./src/document_loaders/web/google_cloud_storage.ts",
    "./src/document_loaders/web/gitbook.ts",
    "./src/document_loaders/web/hn.ts",
    "./src/document_loaders/web/imsdb.ts",
    "./src/document_loaders/web/jira.ts",
    "./src/document_loaders/web/figma.ts",
    "./src/document_loaders/web/firecrawl.ts",
    "./src/document_loaders/web/github.ts",
    "./src/document_loaders/web/taskade.ts",
    "./src/document_loaders/web/notionapi.ts",
    "./src/document_loaders/web/pdf.ts",
    "./src/document_loaders/web/recursive_url.ts",
    "./src/document_loaders/web/s3.ts",
    "./src/document_loaders/web/sitemap.ts",
    "./src/document_loaders/web/sonix_audio.ts",
    "./src/document_loaders/web/confluence.ts",
    "./src/document_loaders/web/couchbase.ts",
    "./src/document_loaders/web/searchapi.ts",
    "./src/document_loaders/web/serpapi.ts",
    "./src/document_loaders/web/sort_xyz_blockchain.ts",
    "./src/document_loaders/web/spider.ts",
    "./src/document_loaders/web/youtube.ts",
    "./src/document_loaders/fs/chatgpt.ts",
    "./src/document_loaders/fs/srt.ts",
    "./src/document_loaders/fs/pdf.ts",
    "./src/document_loaders/fs/docx.ts",
    "./src/document_loaders/fs/epub.ts",
    "./src/document_loaders/fs/csv.ts",
    "./src/document_loaders/fs/notion.ts",
    "./src/document_loaders/fs/obsidian.ts",
    "./src/document_loaders/fs/unstructured.ts",
    "./src/document_loaders/fs/openai_whisper_audio.ts",
    "./src/document_loaders/fs/pptx.ts",
    "./src/utils/convex.ts",
    "./src/utils/event_source_parse.ts",
    "./src/utils/cassandra.ts",
    "./src/experimental/callbacks/handlers/datadog.ts",
    "./src/experimental/graph_transformers/llm.ts",
    "./src/experimental/multimodal_embeddings/googlevertexai.ts",
    "./src/experimental/llms/chrome_ai.ts",
    "./src/experimental/tools/pyinterpreter.ts",
    "./src/chains/graph_qa/cypher.ts",
  ],
  plugins: [
    cjsCompatPlugin({
      files: ["dist/", "CHANGELOG.md", "README.md", "LICENSE"],
    }),
    lcSecretsPlugin(),
    importMapPlugin({
      omitFromImportMap: ["load/index"],
    }),
    importConstantsPlugin({
      entrypoints: [
        "tools/aws_lambda",
        "tools/aws_sfn",
        "tools/duckduckgo_search",
        "tools/discord",
        "tools/gmail",
        "tools/google_calendar",
        "agents/toolkits/aws_sfn",
        "agents/toolkits/ibm",
        "agents/toolkits/stagehand",
        "embeddings/alibaba_tongyi",
        "embeddings/bedrock",
        "embeddings/cloudflare_workersai",
        "embeddings/cohere",
        "embeddings/bytedance_doubao",
        "embeddings/gradient_ai",
        "embeddings/hf",
        "embeddings/hf_transformers",
        "embeddings/huggingface_transformers",
        "embeddings/ibm",
        "embeddings/jina",
        "embeddings/llama_cpp",
        "embeddings/premai",
        "embeddings/tensorflow",
        "embeddings/tencent_hunyuan",
        "embeddings/tencent_hunyuan/web",
        "embeddings/zhipuai",
        "llms/arcjet",
        "llms/bedrock",
        "llms/bedrock/web",
        "llms/cohere",
        "llms/gradient_ai",
        "llms/hf",
        "llms/ibm",
        "llms/llama_cpp",
        "llms/portkey",
        "llms/raycast",
        "llms/replicate",
        "llms/sagemaker_endpoint",
        "llms/watsonx_ai",
        "llms/writer",
        "llms/layerup_security",
        "vectorstores/analyticdb",
        "vectorstores/astradb",
        "vectorstores/azion_edgesql",
        "vectorstores/azure_aisearch",
        "vectorstores/azure_cosmosdb",
        "vectorstores/cassandra",
        "vectorstores/chroma",
        "vectorstores/clickhouse",
        "vectorstores/closevector/node",
        "vectorstores/closevector/web",
        "vectorstores/cloudflare_vectorize",
        "vectorstores/convex",
        "vectorstores/couchbase",
        "vectorstores/elasticsearch",
        "vectorstores/faiss",
        "vectorstores/googlevertexai",
        "vectorstores/hnswlib",
        "vectorstores/hanavector",
        "vectorstores/lancedb",
        "vectorstores/libsql",
        "vectorstores/mariadb",
        "vectorstores/milvus",
        "vectorstores/momento_vector_index",
        "vectorstores/mongodb_atlas",
        "vectorstores/myscale",
        "vectorstores/neo4j_vector",
        "vectorstores/neon",
        "vectorstores/opensearch",
        "vectorstores/pgvector",
        "vectorstores/pinecone",
        "vectorstores/qdrant",
        "vectorstores/redis",
        "vectorstores/rockset",
        "vectorstores/singlestore",
        "vectorstores/supabase",
        "vectorstores/tigris",
        "vectorstores/typeorm",
        "vectorstores/typesense",
        "vectorstores/upstash",
        "vectorstores/usearch",
        "vectorstores/vercel_postgres",
        "vectorstores/voy",
        "vectorstores/weaviate",
        "vectorstores/xata",
        "vectorstores/zep",
        "vectorstores/zep_cloud",
        "chat_models/arcjet",
        "chat_models/bedrock",
        "chat_models/bedrock/web",
        "chat_models/ibm",
        "chat_models/iflytek_xinghuo",
        "chat_models/iflytek_xinghuo/web",
        "chat_models/llama_cpp",
        "chat_models/portkey",
        "chat_models/premai",
        "chat_models/tencent_hunyuan",
        "chat_models/tencent_hunyuan/web",
        "chat_models/webllm",
        "chat_models/zhipuai",
        "callbacks/handlers/llmonitor",
        "callbacks/handlers/lunary",
        "callbacks/handlers/upstash_ratelimit",
        "retrievers/amazon_kendra",
        "retrievers/amazon_knowledge_base",
        "retrievers/arxiv",
        "retrievers/azion_edgesql",
        "retrievers/metal",
        "retrievers/supabase",
        "retrievers/vectara_summary",
        "retrievers/zep",
        "structured_query/chroma",
        "structured_query/qdrant",
        "structured_query/supabase",
        "structured_query/vectara",
        "retrievers/zep_cloud",
        "graphs/memgraph_graph",
        "graphs/neo4j_graph",
        "document_compressors/ibm",
        "document_transformers/html_to_text",
        "document_transformers/mozilla_readability",
        "storage/cassandra",
        "storage/convex",
        "storage/ioredis",
        "storage/upstash_redis",
        "storage/vercel_kv",
        "stores/message/astradb",
        "stores/message/cassandra",
        "stores/message/cloudflare_d1",
        "stores/message/convex",
        "stores/message/dynamodb",
        "stores/message/firestore",
        "stores/message/ipfs_datastore",
        "stores/message/ioredis",
        "stores/message/momento",
        "stores/message/mongodb",
        "stores/message/neo4j",
        "stores/message/planetscale",
        "stores/message/postgres",
        "stores/message/aurora_dsql",
        "stores/message/redis",
        "stores/message/upstash_redis",
        "stores/message/xata",
        "stores/message/zep_cloud",
        "memory/mem0",
        "memory/motorhead_memory",
        "memory/zep",
        "memory/zep_cloud",
        "indexes/postgres",
        "indexes/sqlite",
        "document_loaders/web/apify_dataset",
        "document_loaders/web/assemblyai",
        "document_loaders/web/azure_blob_storage_container",
        "document_loaders/web/azure_blob_storage_file",
        "document_loaders/web/browserbase",
        "document_loaders/web/cheerio",
        "document_loaders/web/puppeteer",
        "document_loaders/web/playwright",
        "document_loaders/web/college_confidential",
        "document_loaders/web/gitbook",
        "document_loaders/web/hn",
        "document_loaders/web/imsdb",
        "document_loaders/web/figma",
        "document_loaders/web/firecrawl",
        "document_loaders/web/github",
        "document_loaders/web/taskade",
        "document_loaders/web/notionapi",
        "document_loaders/web/pdf",
        "document_loaders/web/recursive_url",
        "document_loaders/web/s3",
        "document_loaders/web/sitemap",
        "document_loaders/web/sonix_audio",
        "document_loaders/web/confluence",
        "document_loaders/web/couchbase",
        "document_loaders/web/spider",
        "document_loaders/web/youtube",
        "document_loaders/fs/chatgpt",
        "document_loaders/fs/srt",
        "document_loaders/fs/pdf",
        "document_loaders/fs/docx",
        "document_loaders/fs/epub",
        "document_loaders/fs/csv",
        "document_loaders/fs/notion",
        "document_loaders/fs/obsidian",
        "document_loaders/fs/unstructured",
        "document_loaders/fs/openai_whisper_audio",
        "document_loaders/fs/pptx",
        "utils/convex",
        "utils/cassandra",
        "experimental/multimodal_embeddings/googlevertexai",
        "experimental/hubs/makersuite/googlemakersuitehub",
        "experimental/tools/pyinterpreter",
        "chains/graph_qa/cypher",
      ],
    }),
  ],
});
